import { App } from 'vue'
import 'element-plus/packages/theme-chalk/src/base.scss'

import 'element-plus/packages/theme-chalk/src/index.scss'
import {
  ElForm,
  ElFormItem,
  ElInput,
  ElButton,
  ElContainer,
  ElHeader,
  ElMain,
  ElAside,
  ElMenu,
  ElSubmenu,
  ElMenuItemGroup,
  ElMenuItem,
  ElBreadcrumb,
  ElBreadcrumbItem,
  ElCard,
  ElTable,
  ElTableColumn,
  ElPagination,
  ElConfigProvider,
  ElSteps,
  ElStep,
  ElAlert,
  ElCol,
  ElRow,
  ElTabs,
  ElTabPane,
  ElCascader,
  ElCheckboxGroup,
  ElCheckbox,
  ElMessage,
  ElUpload,
  ElDialog,
  ElTag,
  ElSwitch,
  ElSelect,
  ElOption,
  ElTimeline,
  ElTimelineItem,
  ElMessageBox,
  ElTree,
  ElTooltip

} from 'element-plus'

const components = [
  ElForm,
  ElFormItem,
  ElInput,
  ElButton,
  ElContainer,
  ElHeader,
  ElMain,
  ElAside,
  ElMenu,
  ElSubmenu,
  ElMenuItemGroup,
  ElMenuItem,
  ElBreadcrumb,
  ElBreadcrumbItem,
  ElCard,
  ElTable,
  ElTableColumn,
  ElPagination,
  ElConfigProvider,
  ElSteps,
  ElStep,
  ElAlert,
  ElCol,
  ElRow,
  ElTabs,
  ElTabPane,
  ElCascader,
  ElCheckboxGroup,
  ElCheckbox,
  ElMessage,
  ElUpload,
  ElDialog,
  ElTag,
  ElSwitch,
  ElSelect,
  ElOption,
  ElTimeline,
  ElTimelineItem,
  ElMessageBox,
  ElTree,
  ElTooltip
]

export default function (app: App): void {
  for (const component of components) {
    app.component(component.name, component)
  }
}